package com.biboheart.breport.template.node;

import com.biboheart.breport.template.BrTemplateNode;
import com.biboheart.brick.utils.MapUtils;
import lombok.Getter;

import java.util.Map;

@Getter
public class BrTemplateNodeCol implements BrTemplateNode {
    private String sn;
    private String name;
    private Integer width;
    private String align;
    private Long type;
    private String expression;

    public void convert(Map<String, Object> map) {
        this.sn = MapUtils.getValue(map, "sn", String.class);
        this.name = MapUtils.getValue(map, "name", String.class);
        this.width = MapUtils.getValue(map, "width", Integer.class);
        this.align = MapUtils.getValue(map, "align", String.class);
        this.type = MapUtils.getValue(map, "type", Long.class);
        this.expression = MapUtils.getValue(map, "expression", String.class);
    }
}
